<template>
	<div>
		<div>
			<view>商品管理</view>
			<view>
			<view v-for="(item,index) in goodslist" :key="item.goodsId">
				序号:{{index}},商品名称:{{item.goodsName}},商品库存:{{item.goodsStock}},商品状态:{{item.goodsState}},商品现有数量:{{item.goodsQuantity}},商品价格:{{item.goodsPrice}},商家编号:{{item.storeId}},
			</view>
			</view>
		</div>
	</div>
</template>

<script>
	export default{
		data() {
			return {
				title: '商品管理',
				
				goodslist:{
				},
				// storeId:''
				
			}
		},
		onLoad() {
			
			this.handIntegralSelect()
		},
		methods: {
			handIntegralSelect(){
				const storeId = uni.getStorageSync('storeId');
				console.log(storeId)
				this.storeId=storeId
				uni.request({
				    url: `http://localhost:7000/shop/store/storegoodslist?storeId=`+storeId, //接口地址。
					// data: this.goodslist,
				    header: {
				        'custom-header': 'hello' //自定义请求头信息
				    },
					method:'POST',
				    success: (res) => {
				        console.log(res.data);
				    	this.goodslist=res.data.data.records
						
				    },
				})	
			},
			
		},
	}
</script>

<style>
</style>
